#ifndef NANE_IMODULE_H
#   define  NANE_IMODULE_H

#   include "nane/core/types.h"
#   include "nane/core/IBase.h"
#   include "nane/core/IRefCounted.h"

extern "C"
{
    typedef bool (*TModuleCreator)( nane::IBase** );
    typedef void (*TModuleReleaser)( nane::IBase* );
}

namespace nane
{
    struct ModuleInfo
    {
        const char* interfaceName;
        const char* implementationName;
        uint32 version;
        TModuleCreator Create;
        TModuleReleaser Release;
    };
    
    struct IModule
        : public IRefCounted
    {
        virtual const ModuleInfo* GetInfo() = 0;
        virtual const char* GetName() = 0;
    };
}   // namespace nane

#endif // NANE_IMODULE_H
